<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
	width="500" height="400" id="FLVPlayer1">
	<param name="movie" value="/static/upload/aaa.mp3" />
	<param name="salign" value="lt" />
	<param name="quality" value="high" />
	<param name="scale" value="noscale" />
	<embed src="/static/upload/aaa.mp3"
		quality="high" scale="noscale" width="500" height="400"
		name="FLVPlayer1" salign="LT" type="application/x-shockwave-flash"
		pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

<audio src="/static/upload/aaa.mp3" controls="controls" width="500"
	height="150"> Your browser does not support the audio tag. </audio>


<textarea name="editor1" id="editor1"></textarea>
<script type="text/javascript">
CKEDITOR.replace( 'editor1' );
</script>

<p>
<label for="mcode">formula<img onclick="mathedit.newMath('ddd1','newmath1');" src="static/ckeditor/plugins/mathEdit/mathedit/mewhite24.png"></label>
<span id="newmath1" style="width:300px;"></span>
<input type="text" id="mcode">
<input type="button" value="display" onClick="var temp=mathedit.get('mathPresentation');document.getElementById('mcode').value=temp;document.getElementById('newmath1').innerHTML=temp;">
</p>

<form action="" method="post">
<label>resource</label>
<select name="resource">
<option value="">--</option>
$for i in ogtxml.resources2:
	<option value="$i">$i</option>
</select>
<input type="hidden" name="type" value="resource">
<input type="submit" value="add resource">
</form>

class Knowledgeman:
    def GET(self):
        info = web.input(type="default")
        if info.type not in ogtxml.knowledges2:
            raise web.seeother("/admin")
        else:
            return render.knowledgeman(ogtxml, info.type)
    def POST(self):
        info = web.input()
        if info.lev1 == "1":
            re = model.db.select('knows', where=" knowledge=$info.know and name=$info.Name ", vars=locals())
            if bool(re):
                knowid = re[0].get('id')
            else:
                inset = {'knowledge':info.know , 'name': info.Name, 'version':0}
                knowid = model.db.multiple_insert('knows', values = [inset])[0]
            kid = model.db.multiple_insert(info.know, [funcs.knowledgedbdata(info.know, knowid, info)])[0]
            return {'kid':kid}
        elif info.lev1 == "2":
            info = web.input(resource={})
            rid = model.db.multiple_insert(info.res, [funcs.resourcedbdata(info.res, info)])[0]
            model.db.multiple_insert('know2res', [funcs.know2resdbdata(rid, info)])
            return {'err':0}